;d3dx10.h, d3dx10math.h, d3dx10core.h, d3dx10tex.h, d3dx10mesh.h, d3dx10async.h

D3DX10_SDK_VERSION = 40

;Copyright (C) Microsoft Corporation.  All Rights Reserved.
;File:       d3dx10.h
;Content:    D3DX10 utility library
D3DX10_DEFAULT = -1
D3DX10_FROM_FILE = -3
DXGI_FORMAT_FROM_FILE = -3

;Copyright (C) Microsoft Corporation.  All Rights Reserved.
;File:       D3DX10math.h
;Content:    D3DX10 math types and functions
struct D3DVECTOR
       x dd ?
       y dd ?
       z dd ?
ends

struct D3DMATRIX
       _11 dd ?
       _12 dd ?
       _13 dd ?
       _14 dd ?
       _21 dd ?
       _22 dd ?
       _23 dd ?
       _24 dd ?
       _31 dd ?
       _32 dd ?
       _33 dd ?
       _34 dd ?
       _41 dd ?
       _42 dd ?
       _43 dd ?
       _44 dd ?
ends

D3DX_PI equ 3.14159265358979323846)
D3DX_1BYPI equ 0.31830988618379067154

D3DX_16F_DIG equ 3.0
D3DX_16F_EPSILON equ 4.8875809e-4
D3DX_16F_MANT_DIG equ 11.0
D3DX_16F_MAX equ 6.550400e+4
D3DX_16F_MAX_10_EXP equ 4.0
D3DX_16F_MAX_EXP equ 15.0
D3DX_16F_MIN equ 6.1035156e-5
D3DX_16F_MIN_10_EXP equ -4.0
D3DX_16F_MIN_EXP equ -14.0
D3DX_16F_RADIX equ 2.0
D3DX_16F_ROUNDS equ 1.0
D3DX_16F_SIGN_MASK equ $8000
D3DX_16F_EXP_MASK equ $7C00
D3DX_16F_FRAC_MASK equ $3FF

struct D3DXFLOAT16
       value dw ?
ends

struct D3DXVECTOR2
       x dd ?
       y dd ?
ends

struct D3DXVECTOR216F
       x D3DXFLOAT16
       y D3DXFLOAT16
ends

struct D3DXVECTOR3
       x dd ?
       y dd ?
       z dd ?
ends

struct D3DXVECTOR316F
       x D3DXFLOAT16
       y D3DXFLOAT16
       z D3DXFLOAT16
ends

struct D3DXVECTOR4
       x dd ?
       y dd ?
       z dd ?
       w dd ?
ends

struct D3DXVECTOR416F
       x D3DXFLOAT16
       y D3DXFLOAT16
       z D3DXFLOAT16
       w D3DXFLOAT16
ends

struct D3DXMATRIX
       _11 dd ?
       _12 dd ?
       _13 dd ?
       _14 dd ?
       _21 dd ?
       _22 dd ?
       _23 dd ?
       _24 dd ?
       _31 dd ?
       _32 dd ?
       _33 dd ?
       _34 dd ?
       _41 dd ?
       _42 dd ?
       _43 dd ?
       _44 dd ?
ends

struct D3DXQUATERNION
       x dd ?
       y dd ?
       z dd ?
       w dd ?
ends

struct D3DXPLANE
       a dd ?
       b dd ?
       c dd ?
       d dd ?
ends

struct D3DXCOLOR
       r dd ?
       g dd ?
       b dd ?
       a dd ?
ends

;ID_ID3DXMatrixStack GUID $c7885ba7,$f990,$4fe7,<$92,$2d,$85,$15,$e4,$77,$dd,$85>
interface ID3DXMatrixStack,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  Pop,\
	  Push,\
	  LoadIdentity,\
	  LoadMatrix,\
	  MultMatrix,\
	  MultMatrixLocal,\
	  RotateAxis,\
	  RotateAxisLocal,\
	  RotateYawPitchRoll,\
	  RotateYawPitchRollLocal,\
	  Scale,\
	  ScaleLocal,\
	  Translate,\
	  TranslateLocal,\
	  GetTop

D3DXSH_MINORDER = 2
D3DXSH_MAXORDER = 6

D3DX_NOT_OPTIMIZED = 0
D3DX_3DNOW_OPTIMIZED = 1
D3DX_SSE2_OPTIMIZED = 2
D3DX_SSE_OPTIMIZED = 3

;Copyright (C) Microsoft Corporation.  All Rights Reserved.
;File:       d3dx10core.h
;Content:    D3DX10 core types and functions
D3DX10_SPRITE_SORT_TEXTURE = 1
D3DX10_SPRITE_SORT_DEPTH_BACK_TO_FRONT = 2
D3DX10_SPRITE_SORT_DEPTH_FRONT_TO_BACK = 4
D3DX10_SPRITE_SAVE_STATE = 8
D3DX10_SPRITE_ADDREF_TEXTURES = $10

struct D3DX10SPRITE
       matWorld D3DXMATRIX
       TexCoord D3DXVECTOR2
       TexSize D3DXVECTOR2
       ColorModulate D3DXCOLOR
       pTexture dq ?
       TextureIndex dd ?,?
ends

;IID_ID3DX10Sprite GUID $ba0b762d,$8d28,$43ec,<$b9,$dc,$2f,$84,$44,$3b,$6,$14>
interface ID3DX10Sprite,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  Begin,\
	  DrawSpritesBuffered,\
	  Flush,\
	  DrawSpritesImmediate,\
	  End,\
	  GetViewTransform,\
	  SetViewTransform,\
	  GetProjectionTransform,\
	  SetProjectionTransform,\
	  GetDevice

interface ID3DX10DataLoader,\
	  Load,\
	  Decompress,\
	  Destroy

interface ID3DX10DataProcessor,\
	  Process,\
	  CreateDeviceObject,\
	  Destroy

;IID_ID3DX10ThreadPump GUID $c93fecfa,$6967,$478a,<$ab,$bc,$40,$2d,$90,$62,$1f,$cb>
interface ID3DX10ThreadPump,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  AddWorkItem,\
	  GetWorkItemCount,\
	  WaitForAllItems,\
	  ProcessDeviceWorkItems,\
	  PurgeAllItems,\
	  GetQueueStatus

struct D3DX10FONTDESCA
       Height dd ?
       Width dd ?
       Weight dd ?
       MipLevels dd ?
       Italic dd ?
       CharSet db ?
       OutputPrecision db ?
       Quality db ?
       PitchAndFamily db ?
       FaceName db LF_FACESIZE dup(?)
ends

struct D3DX10FONTDESCW
       Height dd ?
       Width dd ?
       Weight dd ?
       MipLevels dd ?
       Italic dd ?
       CharSet db ?
       OutputPrecision db ?
       Quality db ?
       PitchAndFamily db ?
       FaceName du LF_FACESIZE dup(?)
ends

;IID_ID3DX10Font GUID $d79dbb70,$5f21,$4d36,<$bb,$c2,$ff,$52,$5c,$21,$3c,$dc>
interface ID3DX10Font,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetDevice,\
	  GetDescA,\
	  GetDescW,\
	  GetTextMetricsA,\
	  GetTextMetricsW,\
	  GetDC,\
	  GetGlyphData,\
	  PreloadCharacters,\
	  PreloadGlyphs,\
	  PreloadTextA,\
	  PreloadTextW,\
	  DrawTextA,\
	  DrawTextW,\
	  GetDesc,\
	  PreloadText

D3DERR_INVALIDCALL = $8876086c
D3DERR_WASSTILLDRAWING = $8876021c

;Copyright (C) Microsoft Corporation.  All Rights Reserved.
;File:       d3dx10tex.h
;Content:    D3DX10 texturing APIs
D3DX10_FILTER_NONE = (1 shl 0)
D3DX10_FILTER_POINT = (2 shl 0)
D3DX10_FILTER_LINEAR = (3 shl 0)
D3DX10_FILTER_TRIANGLE = (4 shl 0)
D3DX10_FILTER_BOX = (5 shl 0)
D3DX10_FILTER_MIRROR_U = (1 shl 16)
D3DX10_FILTER_MIRROR_V = (2 shl 16)
D3DX10_FILTER_MIRROR_W = (4 shl 16)
D3DX10_FILTER_MIRROR = (7 shl 16)
D3DX10_FILTER_DITHER = (1 shl 19)
D3DX10_FILTER_DITHER_DIFFUSION = (2 shl 19)
D3DX10_FILTER_SRGB_IN = (1 shl 21)
D3DX10_FILTER_SRGB_OUT = (2 shl 21)
D3DX10_FILTER_SRGB = (3 shl 21)

D3DX10_NORMALMAP_MIRROR_U = (1 shl 16)
D3DX10_NORMALMAP_MIRROR_V = (2 shl 16)
D3DX10_NORMALMAP_MIRROR = (3 shl 16)
D3DX10_NORMALMAP_INVERTSIGN = (8 shl 16)
D3DX10_NORMALMAP_COMPUTE_OCCLUSION = (16 shl 16)

D3DX10_CHANNEL_RED = (1 shl 0)
D3DX10_CHANNEL_BLUE = (1 shl 1)
D3DX10_CHANNEL_GREEN = (1 shl 2)
D3DX10_CHANNEL_ALPHA = (1 shl 3)
D3DX10_CHANNEL_LUMINANCE = (1 shl 4)

D3DX10_IFF_BMP = 0
D3DX10_IFF_JPG = 1
D3DX10_IFF_PNG = 3
D3DX10_IFF_DDS = 4
D3DX10_IFF_TIFF = 10
D3DX10_IFF_GIF = 11
D3DX10_IFF_WMP = 12

D3DX10_STF_USEINPUTBLOB = 1

struct D3DX10IMAGEINFO
       Width dd ?
       Height dd ?
       Depth dd ?
       ArraySize dd ?
       MipLevels dd ?
       MiscFlags dd ?
       Format dd ?
       ResourceDimension dd ?
       ImageFileFormat dd ?
ends

struct D3DX10IMAGELOADINFO
       Width dd ?
       Height dd ?
       Depth dd ?
       FirstMipLevel dd ?
       MipLevels dd ?
       Usage dd ?
       BindFlags dd ?
       CpuAccessFlags dd ?
       MiscFlags dd ?
       Format dd ?
       Filter dd ?
       MipFilter dd ?
       pSrcInfo dq ?
ends

struct D3DX10TEXTURELOADINFO
       pSrcBox dq ?
       pDstBox dq ?
       SrcFirstMip dd ?
       DstFirstMip dd ?
       NumMips dd ?
       SrcFirstElement dd ?
       DstFirstElement dd ?
       NumElements dd ?
       Filter dd ?
       MipFilter dd ?
ends

;Copyright (C) Microsoft Corporation.  All Rights Reserved.
;File:       d3dx10mesh.h
;Content:    D3DX10 mesh types and functions

;IID_ID3DX10BaseMesh GUID $7ed943dd,$52e8,$40b5,<$a8,$d8,$76,$68,$5c,$40,$63,$30>
;IID_ID3DX10MeshBuffer GUID $4b0d117,$1041,$46b1,<$aa,$8a,$39,$52,$84,$8b,$a2,$2e>
;IID_ID3DX10Mesh GUID $4020e5c2,$1403,$4929,<$88,$3f,$e2,$e8,$49,$fa,$c1,$95>
;IID_ID3DX10PMesh GUID $8875769a,$d579,$4088,<$aa,$eb,$53,$4d,$1a,$d8,$4e,$96>
;IID_ID3DX10SPMesh GUID $667ea4c7,$f1cd,$4386,<$b5,$23,$7c,$2,$90,$b8,$3c,$c5>
;IID_ID3DX10PatchMesh GUID $3ce6cc22,$dbf2,$44f4,<$89,$4d,$f9,$c3,$4a,$33,$71,$39>

D3DX10_MESH_32_BIT = 1
D3DX10_MESH_GS_ADJACENCY = 4

struct D3DX10ATTRIBUTERANGE
       AttribId dd ?
       FaceStart dd ?
       FaceCount dd ?
       VertexStart dd ?
       VertexCount dd ?
ends

D3DX10_MESH_DISCARD_ATTRIBUTE_BUFFER = 1
D3DX10_MESH_DISCARD_ATTRIBUTE_TABLE = 2
D3DX10_MESH_DISCARD_POINTREPS = 4
D3DX10_MESH_DISCARD_ADJACENCY = 8
D3DX10_MESH_DISCARD_DEVICE_BUFFERS = $10

struct D3DX10WELDEPSILONS
       Position dd ?
       BlendWeights dd ?
       Normal dd ?
       PSize dd ?
       Specular dd ?
       Diffuse dd ?
       Texcoord dd 8 dup(?)
       Tangent dd ?
       Binormal dd ?
       TessFactor dd ?
ends

struct D3DX10INTERSECTINFO
       FaceIndex dd ?
       U dd ?
       V dd ?
       Dist dd ?
ends

interface ID3DX10MeshBuffer,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  Map,\
	  Unmap,\
	  GetSize

interface ID3DX10Mesh,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetFaceCount,\
	  GetVertexCount,\
	  GetVertexBufferCount,\
	  GetFlags,\
	  GetVertexDescription,\
	  SetVertexData,\
	  GetVertexBuffer,\
	  SetIndexData,\
	  GetIndexBuffer,\
	  SetAttributeData,\
	  GetAttributeBuffer,\
	  SetAttributeTable,\
	  GetAttributeTable,\
	  GenerateAdjacencyAndPointReps,\
	  GenerateGSAdjacency,\
	  SetAdjacencyData,\
	  GetAdjacencyBuffer,\
	  SetPointRepData,\
	  GetPointRepBuffer,\
	  Discard,\
	  CloneMesh,\
	  Optimize,\
	  GenerateAttributeBufferFromTable,\
	  Intersect,\
	  IntersectSubset,\
	  CommitToDevice,\
	  DrawSubset,\
	  DrawSubsetInstanced,\
	  GetDeviceVertexBuffer,\
	  GetDeviceIndexBuffer

D3DX10_MESHOPT_COMPACT = $1000000
D3DX10_MESHOPT_ATTR_SORT = $2000000
D3DX10_MESHOPT_VERTEX_CACHE = $4000000
D3DX10_MESHOPT_STRIP_REORDER = $8000000
D3DX10_MESHOPT_IGNORE_VERTS = $10000000
D3DX10_MESHOPT_DO_NOT_SPLIT = $20000000
D3DX10_MESHOPT_DEVICE_INDEPENDENT = $400000
;D3DX10_MESHOPT_SHAREVB has been removed, please use D3DX10MESH_VB_SHARE instead

;IID_ID3DX10SkinInfo GUID $420bd604,$1c76,$4a34,<$a4,$66,$e4,$5d,$6,$58,$a3,$2c>

D3DX10_SKININFO_NO_SCALING = 0
D3DX10_SKININFO_SCALE_TO_1 = 1
D3DX10_SKININFO_SCALE_TO_TOTAL = 2

struct D3DX10SKINNINGCHANNEL
       SrcOffset dd ?
       DestOffset dd ?
       IsNormal dd ?
ends

interface ID3DX10SkinInfo,\
	  QueryInterface,\
	  AddRef,\
	  Release,\
	  GetNumVertices,\
	  GetNumBones,\
	  GetMaxBoneInfluences,\
	  AddVertices,\
	  RemapVertices,\
	  AddBones,\
	  RemoveBone,\
	  RemapBones,\
	  AddBoneInfluences,\
	  ClearBoneInfluences,\
	  GetBoneInfluenceCount,\
	  GetBoneInfluences,\
	  FindBoneInfluenceIndex,\
	  SetBoneInfluence,\
	  GetBoneInfluence,\
	  Compact,\
	  DoSoftwareSkinning

struct D3DX10ATTRIBUTEWEIGHTS
       Position dd ?
       Boundary dd ?
       Normal dd ?
       Diffuse dd ?
       Specular dd ?
       Texcoord dd 8 dup(?)
       Tangent dd ?
       Binormal dd ?
ends

;Copyright (c) Microsoft Corporation.  All rights reserved.
;File:     D3DX10Async.h
;Content:  D3DX10 Asynchronous Effect / Shader loaders / compilers
D3DX10_ERR_CANNOT_MODIFY_INDEX_BUFFER = $88760b54
D3DX10_ERR_INVALID_MESH = $88760b55
D3DX10_ERR_CANNOT_ATTR_SORT = $88760b56
D3DX10_ERR_SKINNING_NOT_SUPPORTED = $88760b57
D3DX10_ERR_TOO_MANY_INFLUENCES = $88760b58
D3DX10_ERR_INVALID_DATA = $88760b59
D3DX10_ERR_LOADED_MESH_HAS_NO_DATA = $88760b5a
D3DX10_ERR_DUPLICATE_NAMED_FRAGMENT = $88760b5b
D3DX10_ERR_CANNOT_REMOVE_LAST_ITEM = $88760b5c
